{
  "tasks": {
    "task": [
    {{foreach from=$tasks item=task key=tid name=fetasks}}
    {
      "id": "{{$tid}}",
      "images": "{{$task.images}}",
      "name": "{{$task.name}}",
      "pid": "{{$task.pid}}",
      "author": "{{$task.author}}",
      "date": "{{$task.date}}",
      "finish_date": "{{$task.finish_date}}",
      "finish_date_left": "{{$task.finish_date_left}}",
      "dateago": "{{$task.dateago}}",
      "state_date": "{{$task.status_date}}",
      "desc": "{{$task.desc}}",
      "important": "{{$task.important}}",
      "tasktype": "{{$task.tasktype}}",
      "reproted": "{{$task.reported}}",
      "pointTypeID": "{{$task.pointTypeID}}",
      "point": "{{$task.point}}",
      "users":
		      {
		        "user":[ 
		        {{foreach from=$task.users item=user}}
		        {
		          "id": "{{$user.id}}",
		          "name": "{{$user.name}}",
		          "image": "{{$user.image}}"
		        }
		         {{if $smarty.foreach.feusers.last}} {{else}},{{/if}}
      		{{/foreach}}
      		]
		      }
    }
    {{if $smarty.foreach.fetasks.last}} {{else}},{{/if}}
    {{/foreach}}
    ]
  }
}